{% extends 'base.html' %}

{% block title %}发布问答{% endblock %}
{% block body %}
<form method="POST" action="{{url_for('qa.question_public')}}">
  <div class="row">
    <div class="col"></div>
    <div class="col-6 text-center">
      <h2 class="mt-4" style="color:#000000E6">发布问答</h2>
      <div class="form-group">
        <input type="text" class="form-control" name="title" placeholder="请输入标题(5-50个字符)">
      </div>
      <div class="form-group">
        <textarea type="text" class="form-control" name="content" placeholder="请输入内容(至少5个字符)" rows="6"></textarea>
      </div>
      {% with messages = get_flashed_messages() %}
        {% for message in messages %}
          {% if message %}
            <div class="text-danger text-left">{{message}}</div>
          {% endif %}
        {% endfor %}
      {% endwith %}
      <div class="form-group text-right">
        <button class="btn btn-primary" type="submit">提交</button>
      </div>
    </div>
    <div class="col"></div>
  </div>

</form>
{% endblock %}